package com.review.aop.controller;

import com.review.aop.domain.vo.UserLoginVO;
import com.review.aop.service.UserService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/aop")
public class AopController {

    @Autowired
    private UserService userService;

    @RequestMapping("/t1")
    public boolean login(String userName, String password, HttpServletRequest request){
        return userService.login(userName,password,request);
    }

    @RequestMapping("/t2")
    public UserLoginVO loginByToken(String userName, String password){
        return userService.loginByToken(userName,password);
    }

}
